What is "rel = noopener noreferrer" link tag?
What is "rel = noopener noreferrer" link tag?
628
10-Dec-2020
Updated on 22-Jan-2025
Khushi Singh
22-Jan-2025The
rel="no opener no-referrer"attribute is a security and performance feature added to links in HTML. It is commonly used in conjunction with links that open in a new tab or window (i.e., links with thetarget="_blank"attribute). Here's a breakdown of what it does:1. "no opener"
noopenervalue prevents the new tab or window opened by the link from gaining access to the parent page via thewindow.openerproperty in JavaScript.noopener, the newly opened page can execute malicious scripts that manipulate or redirect the original page, creating a security vulnerability.2. "noreferrer"
noreferrervalue ensures that no referrer information (the URL of the original page) is sent to the new page.noopener, providing an additional layer of protection.Why Use
rel="noopener noreferrer"?window.opener.window.opener, it avoids unnecessary memory usage and performance hits caused by maintaining a connection between the two pages.